Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update admins input UI #533

Merged
merged 6 commits into from
Dec 7, 2023
Merged

Conversation

Megha-Dev-19
Copy link
Collaborator

@Megha-Dev-19 Megha-Dev-19 commented Nov 29, 2023

Resolves #241
Preview link

@Megha-Dev-19 Megha-Dev-19 marked this pull request as ready for review November 29, 2023 18:35
@Megha-Dev-19
Copy link
Collaborator Author

Hey @ori-near, please take a look at the UI and let me know if it works as expected

@ori-near
Copy link
Collaborator

Hi @Megha-Dev-19 – this looks awesome! A few follow up requests:

  1. We must require at least one admin. So a user cannot remove all admins. Just everyone except for the first one.
  2. It would be great if we can leverage the suggested mention module you fixed in the previous ticket. For example, if I type @el, I would see a list of possible suggestions and clicking on them will auto complete the person. Also, ideally it wouldn't show any users who've already been added.
  3. I think the "Add Admin" part could use some UX improvement, as it's not entirely clear that you need to type and then click enter. But we can revisit this later.

@Megha-Dev-19
Copy link
Collaborator Author

Hey @ori-near
I am not sure about the first point.
Thinking as a user, I wouldn’t always enter the correct first admin, or maybe I don’t want them anymore and if I am restricted from removing them, it’s an issue.
I can disable the submit button if no admins are added. Or show an error too, to add one.
What’s your views about it.

@ori-near
Copy link
Collaborator

Hi @Megha-Dev-19 – we want to avoid a situation where a group is left without any admins. Essentially whoever creates the group to begin with is the default admin. They can't remove themselves unless they add a secondary admin. Let's say you are the admin of a page you created. You won't be able to remove yourself, but if you add me, I can remove you or you can remove yourself. But the last person cannot be removed unless they add someone else.

@ailisp
Copy link
Collaborator

ailisp commented Nov 30, 2023

We have a prevention on contract side, so if you're removing the last admin, contract would detect it and prevent you from doing so. Of course, It would be nice to also have that validation on frontend

Copy link
Collaborator

@ailisp ailisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides what @ori-near mentioned issues, this PR looks good to me!

@Megha-Dev-19
Copy link
Collaborator Author

Megha-Dev-19 commented Nov 30, 2023

Hey @ori-near I have added your 2nd point.
for 1st point -> when only one admin is there I have disabled delete (not restricted to first item), let me know if you want to change it.
I have made some updates for 3rd point as well, let me know if it is clear now
Preview link

@ori-near
Copy link
Collaborator

ori-near commented Dec 1, 2023

Hi @Megha-Dev-19 – thanks for updating this. Latest feedback below. ✅ indicates good to go, ❌ indicates remaining issue to address.

  1. ✅ Great – looks like criteria is met.
  2. ❌ Looks great ... but right now the mention doesn't load unless the user type "@" – can we make that more intuitive somehow? Either by showing the @ to begin with once a user types in. Or by just skipping the requirement of typing @ to show the mentions. Or open to other suggestions.
  3. ✅ I think adding the mention functionality makes the interface more intuitive.
  4. ❌ NEW point – Can we disable the "x" part when the user is not in edit mode?

Not in edit mode: Should not have x"
Screenshot 2023-12-01 at 1 57 28 PM

In edit mode: Should have an x:
Screenshot 2023-12-01 at 1 57 17 PM

@Megha-Dev-19
Copy link
Collaborator Author

hey @ori-near I have added your suggestions, let me know how it looks now..?
Preview link

@ori-near
Copy link
Collaborator

ori-near commented Dec 4, 2023

Hi @Megha-Dev-19 – this looks great, nicely done. I just have one last additional request:

  1. When you click on an admin (after they've already been added, can we open their profile in a new tab instead of in the existing window? This will ensure that we don't lose progress).

With 5 done, I consider this ticket accepted 🚀 and ready to merge.

@Megha-Dev-19
Copy link
Collaborator Author

@ori-near updated. Link

Copy link
Collaborator

@ailisp ailisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me as well. Thank you @Megha-Dev-19 !

@ailisp ailisp merged commit 7ba0b71 into NEAR-DevHub:main Dec 7, 2023
4 checks passed
@Megha-Dev-19 Megha-Dev-19 deleted the admin-page-ui branch December 13, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Communities] Enhance community admin management and team visibility
3 participants